<% #endcoding:utf-8%>
<%=render partial: "shared/path_nav",locals:{:@paths=>[{name:'首页',url:'/'},{name:'所有需求',url:'/demands'},{name:'发布需求'}]}%>
<div class="panel">
  <h3 class="panel-heading">
    发布需求
  </h3>
  <div class="panel-body">
    <%=render partial: "status",:locals => {:status=>0}%>
    <%=form_for @demand ,url:demands_path do |f|%>
        <div class="form-group">
          <%= f.label :要验的项目%>
          <%= f.text_field :projects,:class=>"form-control"%>
        </div>
        <% cache 'demand_form_description' do %>
        <div class="form-group">
          <%= f.label :需求描述%>
          <%= f.kindeditor :description, :simple_mode => true %>
          <p class="label-info">描述应尽量详细，比如厂房大小、人数等，以便咨询师报合适的价格</p>
        </div>
        <%end%>
        <div class="form-group" style="position:relative">
          <%=f.label :'需求标签:'%><br>
          <%=f.text_field :tag_id,:size=>'20',:class=>'tag-id',:onkeyup=>'tagkeyup(this)'%>
          <ul class="list-group tag-hint"></ul>
        </div>
        <%=f.hidden_field :user_id,value:session[:user_id]%>
        <div class="form-group">
          <%= f.submit "发布",:class=>"btn btn-default"%>
        </div>
    <%end%>
  </div>
</div>
